package Application.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import Application.entity.Attention;

public interface AttentionDao {
	@Insert("insert into attention(userid,objectid)value(#{userid},#{objectid})")
	@Options(useGeneratedKeys=true,keyProperty="id",keyColumn="id")
	public void addAttention(Attention attention);
	
	@Delete("delete from attention where id=#{id}")
	public void removeAttention(int id);

	@Select("select * from attention where useridid=#{id}")
	public List<Attention> findUserAttention(int id);
	
}
